-- GENERATED SPELL FOR [Netherweb Victim] --


function spell0_22355(pUnit, Event) --@Terokkar Free Webbed Creature ON QUEST,n/a--
pUnit:FullCastSpellOnTarget(38950,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22355', 620, 1)
end

function spell1_22355(pUnit, Event) --@Terrokar Free Webbed Creature,n/a--
pUnit:FullCastSpellOnTarget(38949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22355', 575, 1)
end

function Sorts_22355(pUnit, Event)
local choix_sorts_22355 = math.random(0, 1)
if choix_sorts_22355 == 0 then
pUnit:RegisterEvent('spell0_22355', 1, 1)
end
if choix_sorts_22355 == 1 then
pUnit:RegisterEvent('spell1_22355', 1, 1)
end
end

function mob22355_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22355', math.random(1500, 3000), 1)
end

function mob22355_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22355_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22355_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22355, 1, 'mob22355_Action')
RegisterUnitEvent(22355, 2, 'mob22355_Leave')
RegisterUnitEvent(22355, 3, 'mob22355_Kill')
RegisterUnitEvent(22355, 4, 'mob22355_Die')
